Skip to content

docs(im): warn against fabricating chat URLs from chat_id#861

Open
shifengjuan-dev wants to merge 1 commit into
larksuite:mainfrom
shifengjuan-dev:docs/im-chat-link-anti-fabrication
Open

docs(im): warn against fabricating chat URLs from chat_id#861
shifengjuan-dev wants to merge 1 commit into
larksuite:mainfrom
shifengjuan-dev:docs/im-chat-link-anti-fabrication

Conversation

@shifengjuan-dev
Copy link
Copy Markdown
Contributor

@shifengjuan-dev shifengjuan-dev commented May 13, 2026

Summary

  • Add Sharing Chats / Generating Chat URLs note in skills/lark-im/SKILL.md: group share links must come from chats.link; never hand-build applink.feishu.cn/...?chatId=oc_xxx style URLs from a chat_id (they don't navigate).
  • Add Scenario 4 in skills/lark-im/references/lark-im-chat-search.md linking +chat-search -> chats.link and pointing back to the SKILL.md note.

Motivation: a recent postmortem (Bytedance docx NwTcdGd...) captured an Agent fabricating applink.feishu.cn/client/chat/chatter?chatId=oc_xxx URLs for group sharing. The links looked plausible but did not navigate. There was nothing in the skill telling the model "go to chats.link, don't invent URLs" -- so the same trap was easy to walk back into. These two short additions close that gap. The chats.link host is tenant-specific, so it is not hard-coded in docs or examples.

Test plan

  • Render skills/lark-im/SKILL.md and confirm the new section sits between Card Messages and Flag Types.
  • Render skills/lark-im/references/lark-im-chat-search.md and confirm Scenario 4 follows Scenario 3 with a working anchor link back to SKILL.md.
  • No code changes -- existing tests unaffected.

Summary by CodeRabbit

Documentation

  • Documentation
    • Added guidance on correctly generating and sharing chat links using supported methods
    • Included warning against manually constructing chat URLs
    • Added example workflow for searching chats and retrieving their share links

Review Change Stack

Add a "Sharing Chats / Generating Chat URLs" note in lark-im SKILL.md
and a Scenario 4 in chat-search reference, telling users (and agents)
to always source group links from chats.link and never hand-construct
applink.feishu.cn/...?chatId=oc_xxx style URLs -- those do not navigate.

The chats.link host is tenant-specific, so it is not hard-coded in
docs or examples.

Change-Id: I3bd8883f530384b96dcdcfdb2665e84a4dbe639e
@github-actions github-actions Bot added domain/im PR touches the im domain size/M Single-domain feat or fix with limited business impact labels May 13, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 06a870ce-1b86-4c44-a9b2-8b7a62b380ff

📥 Commits

Reviewing files that changed from the base of the PR and between b0c9a4d and 24d46c3.

📒 Files selected for processing (2)
  • skills/lark-im/SKILL.md
  • skills/lark-im/references/lark-im-chat-search.md

📝 Walkthrough

Walkthrough

This PR adds documentation guidance on generating tenant-specific group share links using the chats.link command in the Lark CLI. It includes warnings against manually constructing URLs and demonstrates the feature in both the main skill documentation and a new scenario within the chat search reference.

Changes

Chat Share Link Generation

Layer / File(s) Summary
Proper chat share link generation guidance
skills/lark-im/SKILL.md, skills/lark-im/references/lark-im-chat-search.md
Main skill docs introduce "Sharing Chats / Generating Chat URLs" subsection with chats.link command, validity period options, and explicit warning against manually constructing applink.feishu.cn URLs. Search docs add "Scenario 4" demonstrating extraction of chat_id from search results and subsequent call to im chats link with the same warning.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • larksuite/cli#812: Both PRs update documentation around the im +chat-search skill, overlapping on the same command usage and flag examples.

Suggested labels

domain/im, size/M

Suggested reviewers

  • YangJunzhou-01
  • liangshuo-1

Poem

🐰 A chat link flows with proper cheer,
No hand-built URLs need appear!
chats.link guides the way so clear,
From search results, the URLs engineer. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding documentation warnings against manually constructing chat URLs from chat_id values.
Description check ✅ Passed The description comprehensively covers summary, changes, motivation, and test plan aligned with the repository template, though test plan uses checkboxes rather than checklist format.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/im PR touches the im domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant